//
//  TralvelModel.m
//  HappyTravel
//
//  Created by shuchen on 2018/10/8.
//  Copyright © 2018年 Apple. All rights reserved.
//

#import "TralvelModel.h"

@implementation TralvelModel

- (void)encodeWithCoder:(NSCoder *)aCoder {
    
    [aCoder encodeObject:self.startLocation forKey:@"startLocation"];
    [aCoder encodeObject:self.endLocation forKey:@"endLocation"];
    [aCoder encodeObject:self.date forKey:@"date"];
    [aCoder encodeObject:self.phone forKey:@"phone"];
    [aCoder encodeInteger:self.travelTools forKey:@"travelTools"];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    
    if (self = [super init]) {
        self.startLocation = [aDecoder decodeObjectForKey:@"startLocation"];
        self.endLocation = [aDecoder decodeObjectForKey:@"endLocation"];
        self.date = [aDecoder decodeObjectForKey:@"date"];
        self.phone = [aDecoder decodeObjectForKey:@"phone"];
        self.travelTools = [aDecoder decodeIntegerForKey:@"travelTools"];
    }
    return self;
}

@end
